package com.prism.moodme.app;

import javax.swing.BoxLayout;
import javax.swing.JPanel;
import java.awt.Dimension;
import java.awt.BorderLayout;
import javax.swing.JTextField;

public class SearchPane extends JPanel {

	private static final long serialVersionUID = 1L;
	private SearchPanel searchPanel;
	private JPanel wavePanel;
	private MainFrame mainFrame;
	/**
	 * This is the default constructor
	 */
	public SearchPane(MainFrame mainFrame) {
		super();
		setMainFrame(mainFrame);
		initialize();
	}

	private void setMainFrame(MainFrame mainFrame) {
		this.mainFrame = mainFrame;

	}

	/**
	 * This method initializes this
	 *
	 * @return void
	 */
	private void initialize() {


		this.setLayout(new BorderLayout());
		this.setSize(new Dimension(1000, 150));
		this.setPreferredSize(new Dimension(1000, 150));
		this.add(getSearchPanel(), BorderLayout.WEST);
		this.add(getWavePanel(), BorderLayout.EAST);
	}

	/**
	 * This method initializes SearchPanel
	 *
	 * @return javax.swing.JPanel
	 */
	private SearchPanel getSearchPanel(){
		if(searchPanel == null) {
			searchPanel = new SearchPanel(getMainFrame());
		}
		return searchPanel;
	}

	/**
	 * This method initializes WeekFreqPanel
	 *
	 * @return javax.swing.JPanel
	 */
	JPanel getWavePanel() {
		if (wavePanel == null) {
			wavePanel = new JPanel();
			wavePanel.setLayout(new BoxLayout(getWavePanel(), BoxLayout.X_AXIS));
			wavePanel.setSize(new Dimension(600,150));
		}
		return wavePanel;
	}

	public MainFrame getMainFrame(){
		return this.mainFrame;
	}

}
